#include "Field.h"

Field::Field(const QString & _position) : position(_position), figure(nullptr)
{
}

void Field::put(Figure *_figure)
{
    figure = _figure;
    figure->setCurrentPosition(position);
}

void Field::clear()
{
    figure = nullptr;
}

Figure * Field::getFigure() const
{
    return figure;
}

QString Field::getPosition() const
{
    return position;
}

Field::~Field()
{
    delete figure;
}
